package com.itcm.skymail.cart.config;

import com.itcm.skymail.cart.interceptor.CartInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * 描述:
 *
 * @author cm_fighting
 * @create 2020-11-23 1:42 下午
 */
@Configuration
public class SkymallWebConfig implements WebMvcConfigurer {

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        // 配置添加拦截器并配置拦截路径
        registry.addInterceptor(new CartInterceptor()).addPathPatterns("/**");
    }
}
